<?php
/*
	服务公司：沧州讯呗网络科技有限公司
	作者：sun
*/
namespace App\Http\Controllers\Web;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\RechargeRepository;
use App\Traits\BaseFun;

class RechargeController extends Controller
{
    public function __construct(RechargeRepository $RechargeRepository)
    {
        $this->RechargeRepository=$RechargeRepository;
    }
    public function Recharge(Request $request)
    {   
        
        $res = $this->RechargeRepository->weiGuo(['end_time'=>date('Y-m-d',time())]);
        
        if ($res) {
           $ArrDate = ['state' => 0, 'data' => $res, 'token' => $request->input('token')];
        }else{
           $ArrDate = ['state' => 2, 'data' => $res, 'msg' => '获取失败!']; 
        }
        return BaseFun::jsonReturn($ArrDate);
    }

}
